package grape.base.service.feedback.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import grape.base.service.feedback.po.Feedback;
import grape.base.service.feedback.mapper.FeedbackMapper;
import grape.base.service.feedback.api.IFeedbackService;
import grape.common.service.common.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 意见反馈表 服务实现类
 * </p>
 *
 * @author yangwei
 * @since 2020-03-15
 */
@Service
public class FeedbackServiceImpl extends BaseServiceImpl<FeedbackMapper, Feedback> implements IFeedbackService {

    @Override
    public int countByPreviousFeedbackId(String id) {
        assertParamNotEmpty(id,"id不能为空");
        return count(Wrappers.<Feedback>lambdaQuery().eq(Feedback::getPreviousFeedbackId,id));
    }
}
